from django.shortcuts import render
# 导入类视图
from django.views import View
# 导入模型类
from .models import *
# 导入响应数据函数
from common.respond.res import res


# Create your views here.


# 获取商品分类数据
class GetOneCate(View):
    def get(self, request):
        cate_one_list = list(GoodsCate.objects.all().values())
        # 获取全部数据
        return res(200, "获取成功！", {"cateOneList": cate_one_list})
